package modelTest;

import Model.LoginModel;
import junit.framework.TestCase;

public class LoginModelTest extends TestCase {
	LoginModel model;
	
	protected void setUp() throws Exception {
		super.setUp();
		model = new LoginModel();
	}

	protected void tearDown() throws Exception {
		super.tearDown();
	}

	public void testLogin_Success() {
		Boolean result = model.login("tester", "102385");
		assertTrue(result);
	}

	public void testLogin_Fail_Username() {
		Boolean result = model.login("tester1", "102385");
		assertFalse(result);
	}

	public void testLogin_Fail_Password() {
		Boolean result = model.login("tester", "12345");
		assertFalse(result);
	}

	public void testQuery() {
		String result = model.query("http://happywaiman.dlinkddns.com/Reserve/User/test.php");
	}

}
